package com.sheledon.demo.demo1.service;

import com.sheledon.demo.pojo.User;
import com.sheledon.flyCat.annotation.boot.Component;

@Component(name = "us")
public class UserService {

    public User getUserById(int id){
        User user = new User();
        user.setAge(id);
        user.setName("wangyiyoudao");
        return user;
    }
    public User getUserById(int id,String name){
        User user = new User();
        user.setAge(id);
        user.setName(name);
        return user;
    }
    public void saveUser(User user){
        System.out.println("保存: "+user);
    }
}
